package de.szut.tictactoe.game;

public class Game {
	private Field ticField;
	
	// false: o
	// true: x
	private boolean currentPlayer;
	public boolean isCurrentPlayer() {
		return currentPlayer;
	}

	public Game() {
		// generates the tic tac toe internal field
		ticField = new Field();
		currentPlayer = true;
	}
	
	public boolean gameHasEnded() {
		return ticField.gameHasEnded();
	}
	
	public void setValue(int x, int y) {
		ticField.setValue(currentPlayer, x, y);
	}
	
	public void switchCurrentPlayer() {
		currentPlayer = !currentPlayer;
	}
}
